package adapter;

public class AutoPlayer implements  MediaPlayer {

    MediaAdapter mediaAdapter;
    @Override
    public void play(String type, String filename) {
        if("mp3".equalsIgnoreCase(type))
            System.out.println("mp3: "+filename+" is playing");
        else if("vic".equalsIgnoreCase(type)|| "mp4".equalsIgnoreCase(type))
        {
            mediaAdapter=new MediaAdapter(type);
            mediaAdapter.play(
                    type,
                    filename
            );
        }
    }
}
